package cate.game.role.bag.furniture;

import cate.common.table.d.GDBag;
import cate.common.table.d.GDObj;
import cate.common.table.item.furniture.row.FurnitureItemBaseRow;
import cate.game.role.Role;
import cate.game.role.bag.BagContainer;
import cate.game.role.bag.furniture.msg.FurnitureAddResp;
import com.fasterxml.jackson.annotation.JsonIgnore;

public class FurnitureBag extends BagContainer<Furniture> {
    public FurnitureBag(){

    }

    public FurnitureBag(Role role){
        super(role);
    }

    @Override
    protected byte getItemType() {
        return GDObj.Type.FURNITURE;
    }

    @Override
    public int calcCapacity() {
        return GDBag.Capcity.FURNITURE;
    }

    @Override
    protected FurnitureAddResp createItemAddMsg() {
        return new FurnitureAddResp();
    }

    @Override
    @JsonIgnore
    public FurnitureItemBaseRow getItemTpl(int tid){
        return role.getGame().table.furniture.base.get(tid);
    }

    @Override
    protected Furniture createItem(int tid, long num) {
        // 固定属性手办
        return new Furniture(role, tid);
    }
}
